POV-Ray : Newsgroups : povray.general : Projector whit Avi : Re: Projector with Avi and mirror (can be done) Server Time
4 Nov 2024 17:32:54 EST (-0500)
  Re: Projector with Avi and mirror (can be done)  
From: Hughes, B 
Date: 1 Nov 2003 02:47:25
Message: <3fa3650d@news.povray.org>
/* how a slide projector might work in POV 3.5 */

#version 3.5;

global_settings {
  assumed_gamma 1.0
  photons {
   spacing 0.003 // quality (lower better)
  }
}

// ----------------------------------------

camera {
  location  <0, 3, -3>
  right     x*image_width/image_height
  look_at   <0, 1, 0>
}

light_source {
  <0,0,0>, color rgb 1
  looks_like {cone {-x/2,1/4,x/2,1/2 pigment {rgb 1} finish {ambient 0.5}}}
  spotlight
  radius 6 falloff 8
  point_at x
  rotate 45*y translate <-3, 0, 3>
}

// ----------------------------------------

plane {
  y, -1
  texture {
    pigment { checker color rgb 1 color blue 1 scale 0.5 }
  }
  photons {
   collect off // no photons gathered here
  }
}

/* MIRROR */
box {-1,1 scale <1,1,.1>
 pigment {rgb 0}
 finish {ambient 0 diffuse 0 reflection {0.1,1}}
  photons { // make visible to light rays
   target
   reflection on
   refraction off
  }
}

/* SCREEN */
box {-1,1 scale <1,1,.1>
 pigment {rgb 1}
 finish {ambient 0 diffuse 0.5}
 rotate 45*y translate <3,0,3>
  photons { // make visible to light rays
   //target
   collect on
  }
}

/* PICTURE */
box {
  0, 1
  clipped_by {plane {-z,0}}
  texture {
    pigment {
      image_map {
        gif "test.gif"
        interpolate 2 // smooth it
        once   // don't tile image, just one copy
        filter 0 0.5  // make 1st color half transparent
        filter 1 1  // make 2nd color mostly transparent
        filter 2 0.75  // make 3rd color 3/4 transparent
      }
      // transform it to unit-size (-1 to +1)
    }
    finish { ambient 0.3 }
  }
      translate -0.5*(x+y) // center on the origin
      scale 2              // make it unit-sized
      /* now fit in front of light */
  scale <1,1,0.1>/4 rotate -45*y translate <-2,0,2>
  photons { // make visible to light rays
   target
   reflection off
   refraction off
   pass_through // let light pass by
   collect off // no photons gathered here
  }
}

/////////////////////////

There might be such an example scene file someplace else but I went ahead
with my on try anyhow.

Again, you may have already realized how to do this but you did not say
exactly. I wanted to prove it could be done to some extent myself anyhow,
and of course, with enough photons packed into the area the "projected"
could be fine enough. Only slower and slower to parse, perhaps, depending on
the complexity of the objects used.

Bob H.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.